what do i have to know to write a Tetris prog. [simple C, without any bonus headers]
and whats the theory of tetris game (is that a whole >>> Matrix or strings or ???)
what do i have to know to write a Tetris prog. [simple C, without any bonus headers]
and whats the theory of tetris game (is that a whole >>> Matrix or strings or ???)
You're not going to be able to do it without "bonus headers" because there's no standard way to draw arbitrarily to the screen. You have to pick a library to help you out. Do you want to do it in the console or in a GUI? What OS are you using? What compiler are you using?
If you understand what you're doing, you're not learning anything.
First learn use standard output (console), and input (keyboard).
Then use bi-dimensional arrays. This could be your board var:Then put all those in a while cicleCode:char board[40][10]={ {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ','o','o','o',' ',' '}, {' ','o','o','o',' ',' ',' ','o','o','o'}, {'o','o','o','o','o','o','o','o',' ','o'} /***************************/ };